function login() {
	var username=document.getElementById("username").value;
	var password=document.getElementById("password").value;
	var ajax=new XMLHttpRequest();
	ajax.onreadystatechange=function(){
		if(ajax.readyState==4 && ajax.status==200){
			if(ajax.responseText=="succes"){
				alert("登陆成功！");
				window.location="./relinking.jsp?username="+username;
			}else {
				alert("登陆失败！");
				return ;
			}
		}else if(ajax.readyState==4){
			alert("登陆失败！");
			return ;
		}
	};
	ajax.open("post", "./AdminLogin", true);
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("username="+username+"&password="+password);
}

function redo() {
	document.getElementById("username").value="";
	document.getElementById("password").value="";
}
